window.onload = function() {
  alert("欢迎！");
};

const buttons = document.querySelectorAll('button');
buttons.forEach(button => {
  button.addEventListener('click', () => {
    alert('你点击了一个按钮！');
  });
});